<template>
  <div class="child2">
    <h1>我是Child2组件</h1>
    <h3>我有一个电脑：{{computer}}</h3>
    <button @click="$bus.$emit('wan',computer)">把电脑给哥哥玩一下</button>
  </div>
</template>

<script>
  export default {
    name:'Child2',
    data() {
      return {
        computer:'联想',
      }
    },
    /* mounted() {
      console.log(this.a)
    }, */
  }
</script>

<style scoped>
  .child2 {
    background-color: orange;
    padding: 20px;
  }
</style>